package com.bclz.environment;

import org.apache.hadoop.io.WritableComparable;
import org.apache.hadoop.io.WritableComparator;

public class EnvironmentCombiner extends WritableComparator {

    protected EnvironmentCombiner() {
        super(Environment.class, true);
    }

    @Override
    public int compare(WritableComparable a, WritableComparable b) {
        Environment envir1=(Environment)a;
        Environment envir2=(Environment)b;
        return envir1.getYearAndMonth().compareTo(envir2.getYearAndMonth());
    }
}
